<template>
  <div class="search-wapper">
    <van-nav-bar
      title="搜索"
      left-text="返回"
      left-arrow
      fixed
      @click-left="onClickLeft"
    >
      <van-icon name="arrow-left" slot="left" />
      <!--<van-icon name="search" slot="right"/>-->
    </van-nav-bar>
    <div class="search-content">
      <van-cell-group>
        <van-field v-model="billid" label="单据号" placeholder="请输入单据号" />
      </van-cell-group>
    </div>
    <div class="button-content">
      <van-button type="primary" round style="width: 100%" @click="submitInfo"
        >查询</van-button
      >
    </div>
  </div>
</template>

<script>
export default {
  name: "Search",
  data() {
    return {
      billid: "",
	  comCodeList:[]
    };
  },
  methods: {
    submitInfo() {
      this.$router.push({
        path: "/order",
        query: { billid: this.billid }
      });
    },
    onClickLeft() {
      this.$router.back(-1);
    },
    onSelect(item) {
      // 默认情况下，点击选项时不会自动关闭菜单
      // 可以通过 close-on-click-action 属性开启自动关闭
      this.show = false;
      // Toast(item.name);
      console.log("onSelect======", item.name);
      this.userInfo.actions = item.name;
    },
    clickRight() {
      console.log("=====clickRight===");
      this.show = true;
    }
  }
};
</script>

<style scoped lang="scss">
.search-wapper {
  position: relative;
  .search-content {
    position: relative;
    /*top: 46px;*/
    /*height: calc(100% - 50px);*/
    /*margin-bottom: 10px;*/
    margin: 20px;
    padding: 5px;
    background: #fff;
    border-radius: 8px;
    top: 37%; /*偏移*/
    transform: translateY(-50%);
  }
  .button-content {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 20px;
    padding: 0px 20px;
  }
}
</style>
